package com.prog3.calendarutec;

import java.io.IOException;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;

import com.prog3.calendarutec.conecciones.DbConection;

public class Inicio extends Activity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_inicio);

        
        try {
        	DbConection db=new DbConection(this);
			if(db.createDataBase()){
				//db.open();
				//db.crearInicio();
				//db.close();
			}
		} catch (IOException e) {
			
		}
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_inicio, menu);
        return true;
    }
    public void irAPersonalizarUsuario(View v) throws ClassNotFoundException
    {
    	
    	Class<?> clase2 = Class.forName("com.prog3.calendarutec.Configuracion");
    	Intent intento1 = new Intent(Inicio.this,clase2);
		this.startActivity(intento1);
		
    	
    }
    public void irAGregarEvent(View v) throws ClassNotFoundException
    {
    	Class<?> clase3 = Class.forName("com.prog3.calendarutec.AddEvento");
    	Intent intento1 = new Intent(Inicio.this,clase3);
		this.startActivity(intento1);
    	
    	}
    public void irACalendar(View v) throws ClassNotFoundException
    {
    	Class<?> clase4 = Class.forName("com.prog3.calendarutec.Mes");
    	Intent intento1 = new Intent(Inicio.this,clase4);
		this.startActivity(intento1);
    }
    public void irAacercade(View v) throws ClassNotFoundException
    {
    	Class <?> clase5 = Class.forName("com.prog3.calendarutec.Acerca");
		Intent intento1 = new Intent( Inicio.this,clase5);
		this.startActivity(intento1);
    }
    public void salir(View v)throws ClassNotFoundException
    {
    	finish();
    	
    }
}
